<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Bonobo Activation Query Langage</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Bonobo Activation API Reference Manual">
<link rel="up" href="index.html" title="Bonobo Activation API Reference Manual">
<link rel="prev" href="async-activation.html" title="Async Activation">
<link rel="next" href="query-syntax.html" title="Syntax">
<meta name="generator" content="GTK-Doc V1.15.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="async-activation.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td> </td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Bonobo Activation API Reference Manual</th>
<td><a accesskey="n" href="query-syntax.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="chapter">
<div class="titlepage"><div><div><h2 class="title">
<a name="query-langage"></a>Bonobo Activation Query Langage</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="sect1"><a href="query-langage.html#id2763345">The Bonobo Activation query langage</a></span></dt>
<dt><span class="sect1"><a href="query-syntax.html">Syntax</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="query-syntax.html#oaf-query-ref-types">Constants</a></span></dt>
<dt><span class="sect2"><a href="query-syntax.html#id2763994">Field identifiers</a></span></dt>
<dt><span class="sect2"><a href="query-syntax.html#id2764020">Variables</a></span></dt>
<dt><span class="sect2"><a href="query-syntax.html#id2764048">Functions</a></span></dt>
<dt><span class="sect2"><a href="query-syntax.html#id2764132">Operators</a></span></dt>
</dl></dd>
</dl></div>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id2763345"></a>The Bonobo Activation query langage</h2></div></div></div>
<p>
Bonobo Activation has a query language used to request components with
specific properties from the Bonobo Activation daemon.
The API call <code class="function">bonobo_activation_activate</code> takes a
<span class="emphasis"><em>requirements</em></span> parameter which is
a string containing a specific request in the OAF query 
langage.
A simple example is:
</p>
<pre class="programlisting">
CORBA_Object o = bonobo_activation_activate ("repo_ids.has ('IDL:GNOME/Graph/Layout:1.0')",
                                             NULL, 0, NULL, &amp;ev);
</pre>
<p>
This will ask for a component which supports the GNOME/Graph/Lyout:1.0 interface.
You can also do much more complicated things.
</p>
<pre class="programlisting">
"(repo_ids.has_all (['IDL:Bonobo/Control:1.0',
		     'IDL:Nautilus/ContentView:1.0']) OR
  repo_ids.has_one (['IDL:Bonobo/Control:1.0',
                     'IDL:Bonobo/Embeddable:1.0'])) AND
  repo_ids.has('IDL:Bonobo/PersistFile:1.0') AND
  foo:bar.defined()"
</pre>
<p>
This would get any component with both 'Control' and 'ContentView' or
with either 'Control' or 'Embeddable' as long as they supported the
'PersistFile' interface, and defined the attribute 'foo:bar'.
</p>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.15.1</div>
</body>
</html>